package HierarchyPackage;

import ClassifiedDataSetPackage.ClassifiedDataSet;
import DataSetPackage.View;

import java.util.Collection;
import java.util.concurrent.ExecutorService;

/**
 * Interface for threaded version of <code>getClassifications</code>.
 * It is recommended that all hierarchies also implements this interface.
 *
 * @author Martin Haulrich
 */
public interface HierarchyThreaded extends Hierarchy{
        
    /**
     * Returns a <code>classifiedDataSet</code> containings classifications for the dataset.
     * The method uses multi-threading and created threads are placed in <code>pool</code>.
     * Note that this method is not necesarily faster that the none-threaded equivalent.
     * @return A <code>classifiedDataset</code> containing classifications for the dataset.
     * @param pool Thread-pool to place created threads in.
     * @param dids ID of the datapoints in to classify.
     * @param dv View on the dataset containing the data points that should be classified.
     * @param topClass Class to classify with respect to.
     * @param maxDepth Maximum depth of classifications.
     * If an error arises during the classification this Exception is thrown.
     * This error could for instance be problem with reading the data using the view <code>dv</code>.
     */
    public ClassifiedDataSet getClassifications(Collection<Integer> dids, View dv, HClass topClass,
            int maxDepth, int minCount, int cutFraction, boolean saveData, ExecutorService pool);
    
}
